﻿using Susha.Areas.Admin.Models.Requests;
using Susha.Models.Helpers;
using Susha.Models.Pages;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Susha.Areas.Admin.Controllers
{
    public class GuestController : Controller
    {
        //
        // GET: /Admin/Guest/

        public ActionResult Index(Int32? id)
        {
            Int32 pageNo;
            Int32.TryParse(id.ToString(), out pageNo);
            GuestPage GuestPage = new GuestPage(pageNo);
            return View(GuestPage);
        }

        [HttpPost]
        [Authorize(Roles="Admin")]
        public String SetAdminComment(AdminComment comment)
        {
            return GuestRepository.SetAdminComment(comment);
        }
    }
}
